<template>
	<view class="convert">
		<view class="gold">
			<view class="gold_info" v-for="(item,index) in goldList" :key="index" @click="goodsClick(item)">
				<view class="gold_info_image">
					<image :src="item.image" mode=""></image>
				</view>
				<uni-icons type="uniE6D1"></uni-icons>
				<view class="gold_title">
					{{item.storeName}}
				</view>
				<view class="gole_price">
					{{item.processingFee}}+￥<span>{{item.commodityPoints}}金粉/积分</span>
				</view>
				<view class="gold_fuke">
					<view class="gold_fuke_price">
						￥{{item.otPrice}}
					</view>
					<view class="gold_sales">
						{{item.sales}}已售
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				goldList:[]
			}
		},
		methods: {
			goodsClick(item){
				uni.navigateTo({
					url:'/pages/convert-detail/convert-detail?id='+item.id
				})
			},
			SeachData(){
				this.$http({
					url:'/crmStoreProduct/selCrmStoreProductBriefExchange'
				}).then(res=>{
					console.log(res)
					this.goldList = res.data.data.list
				})
			}
		},
		onLoad() {
			this.SeachData()
		}
	}
</script>

<style>
	.convert{
		height: calc(100vh - 90rpx);
		background-color:#F8F8F8
	}
.gold_fuke_price {
	text-decoration: line-through
}

.gold_fuke {
	display: flex;
	color: #ababab;
	font-size: 10rpx;
	/* #ifdef MP-WEIXIN */
	font-size: 20rpx;
	/* #endif */
	justify-content: space-between;
	margin-left: 7rpx;
	margin-right: 5rpx;
}

.gole_price span {
	font-size: 30rpx;
	/* #ifdef MP-WEIXIN */
	font-size: 30rpx;
	/* #endif */
}

.gole_price {
	margin-left: 7rpx;
	margin-top: 0px;
	font-size: 10rpx;
	/* #ifdef MP-WEIXIN */
	font-size: 20rpx;
	/* #endif */
	color: red;
	font-weight: 800;
}

.gold_title {
	/* #ifdef APP */
	color: #ababab;
	font-size: 10rpx;
	margin-left: 5rpx;
	/* #endif */
	/* #ifdef H5 */
	color: #ababab;
	font-size: 10rpx;
	margin-left: 5rpx;
	/* #endif */
	/* #ifdef MP-WEIXIN */
	color: #ababab;
	font-size: 20rpx;
	margin-left: 7rpx;
	/* #endif */
}

.gold {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	margin-left: 10px;
	margin-right: 10px;
}

.gold_info {
	margin-top: 20rpx;
	margin-bottom: 10rpx;
	overflow: hidden;
	width: 48%;
	height: 30%;
	background-color: white;
	border-radius: 20rpx;
}

.gold_info .gold_info_image {
	height: 21vh;
	width: 100%;
}

.gold_info .gold_info_image image {
	width: 100%;
	height: 100%;
}
</style>
